package com.itany.shop.service;

import com.itany.shop.entity.User;
import com.itany.shop.exception.CodeErrorException;
import com.itany.shop.exception.RequestParameterErrorException;
import com.itany.shop.exception.UserExistException;
import com.itany.shop.exception.UserNotExistException;

/**
 * @Author:石小俊
 * @Date:2022/12/15 11:14
 * @Version:1.0-SNAPSHOT
 * @Description:
 */
public interface UserService {

    /**
     * 用户注册
     * @param username  用户名,不能重复
     * @param password  密码,加密
     * @param phone     电话
     * @param address   地址
     */
    public void register(String username, String password, String phone,String address) throws RequestParameterErrorException, UserExistException;

    /**
     * 用户登录
     * @param username  用户名
     * @param password  密码,加密
     * @param code      用户输入的验证码
     * @param image     验证码图片的内容
     * @return
     */
    public User login(String username,String password,String code,String image) throws RequestParameterErrorException, CodeErrorException, UserNotExistException;
}
